import { defineStore } from "pinia";
import { store } from "@/store/index";

const useProductStore = defineStore({
  id: "product",
  state: () => {
    return {
      one: "大彩电",
      two: "大冰箱",
    };
  },
  actions: {
    alterOne(val: any) {
      this.one += val;
    },
    alterTwo(val: any) {
      this.two += val;
    },
  },
});

export function useProductStoreWithOut() {
  return useProductStore(store);
}
